#ifdef _WIN32
#ifdef WITH_OPENGL
#pragma once

#include "renderer.h"
#include "driver.h"

#include <windows.h>
#include "opengl.h"

namespace krryn{
namespace core{
	class job_manager;
}
namespace scene{
	class mesh;
}
namespace system_imp{
	class renderer_opengl;
	class input_manager_win32;
	class renderer_opengl_win32 : public system::renderer{
	public:
		renderer_opengl_win32(renderer_opengl *a_Renderer, core::job_manager *a_Manager, const system::window_settings &a_Settings);
		virtual ~renderer_opengl_win32();

		virtual system::input_manager* get_input_manager();

		virtual void begin_scene();
		virtual void draw(scene::mesh *a_Mesh, const math::matrix &a_Transformation);
		virtual view::shader_catalog* get_shader_catalog();
		virtual void end_scene();
		virtual void set_projection_matrix(const math::matrix &a_ProjectionMatrix);
		virtual void set_camera(view::camera *a_Camera);
	private:
		system::window_settings m_Settings;

		void create_window(const system::window_settings &a_Settings);
		void destroy_window(const system::window_settings &a_Settings);

		HDC	m_hDC;
		HGLRC m_hRC;
		HWND m_hWnd;
		HINSTANCE m_hInstance;
		renderer_opengl *m_Renderer;
		input_manager_win32 *m_InputManager;
    };
}
}

#endif
#endif